package com.DateTest;

import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.Map;

public class Solution
{
    public static void main(String[] args)
    {
//        int arr[] = new int[]{175,173,174,163,182,177};
        int arr[] = new int[]{175,179,174,163,176,177};
        DistanceToHigher(arr);
    }

    public static int[] DistanceToHigher(int[] height)
    {
        int len = height.length;
        int arr[] = new int[len];
        for (int i = 0; i < len; i++)
        {
            arr[i] = help(height,i);
        }
        for (int i = 0; i < arr.length; i++)
        {
            System.out.println(arr[i]);
        }
        return null;
    }

    public static int help(int[] height, int index)
    {
        for (int i = index; i >= 0; i--)
        {
            if (height[i] > height[index])
            {
                return index - i;
            }
        }
        return 0;
    }
}
